import { getAction, postAction } from '@/api/manage'

// 获取所有数据字典域
const all = (params) => getAction('/admin/dataDictDomain/all', params)
// 数据字典域列表
const list = (params) => getAction('/admin/dataDictDomain/page', params)
// 删除数据字典域
const del = (params) => postAction(`/admin/dataDictDomain/delete/${params}`)
// 批量删除数据字典域
const batchDel = (params) => postAction(`/admin/dataDictDomain/batchDel`, params)
// 新增数据字典域
const create = (params) => postAction('/admin/dataDictDomain/create', params)
// 编辑数据字典域
const edit = (params) => postAction('/admin/dataDictDomain/update', params)
// 导出数据字典域
const exports = (params) => postAction('/admin/dataDictDomain/export', params, 'blob')
// 下载数据字典域模板
const download = (params) => postAction('/admin/dataDictDomain/download', params, 'blob')
// 导入数据字典域
const imports = (params) => postAction('/admin/dataDictDomain/import', params)

export {
  all,
  list,
  del,
  batchDel,
  create,
  edit,
  exports,
  download,
  imports
}
